<!--<?php
if ($type=='addtype') {print <<<EOT
-->
<form action="$ajax_basename" onsubmit="return false;" method="post">
<input type="hidden" name="type" value="addtype" />
<input name="sub" value="$sub" type="hidden">
<input type="hidden" name="step" value="2" />
	<div class="popoutContent">
	<h2 class="h1" onmousedown="read.move(event);" style="cursor:move"><a class="del_img fr" href="javascript:;" onclick="closep();">关闭</a>添加分类</h2>
	<div style="overflow-y: auto;">
		<div class="admin_table mb10">
			<table width="100%" cellspacing="0" cellpadding="0">
				<tbody>
					<tr class="tr2 vt">
						<td width="30" class="tac">顺序</td>
						<td width="120">名称</td>
					</tr>
					<tr class="tr1">
						<td class="td2 tac"><input name="position" class="input input_wd" type="text"></td>
						<td class="td2"><input name="name" class="input input_wa" type="text"></td>
					</tr>
				</tbody>
			</table>
		</div>
	<div class="mb10 tac"><span class="btn2"><span><button onfocus="blur();" onclick="ajax.submit(this.form,ajax.guide);" type="button">提 交</button></span></span><span class="bt2"><span><button onfocus="blur();" onclick="closep();" type="button">取 消</button></span></span></div>
	</div>
	</div>
</form>
<!--
EOT;
}else{print <<<EOT
-->
<form action="$ajax_basename" onsubmit="return false;" method="post">
<input type="hidden" name="type" value="editimage" />
<input type="hidden" name="id" value="$id" />
<input name="step" value="2" type="hidden">
<input type="hidden" value="$hid" name="hid" />
	<div class="popoutContent">
	<h2 class="h1" onmousedown="read.move(event);" style="cursor:move"><a class="del_img fr" href="javascript:;" onclick="closep();">关闭</a>修改照片</h2>
	<div style="overflow-y: auto;">
		<div class="admin_table mb10">
			<table width="100%" cellspacing="0" cellpadding="0">
				<tbody>
					<tr class="tr1 vt">
						<td class="td1">相册分类</td>
						<td class="td2"><select class="select_wa" name="typeid" >
<!--
EOT;
foreach ($topTypes as $key => $top) {
$selected = $key==$image[typeid] ? 'selected="selected"':'';
print <<<EOT
-->
    <option $selected value="$key">$top[name]</option>
<!--
EOT;
if($secendTypes[$key]){
foreach ($secendTypes[$key] as $k=>$secend) {
$selected = $k==$image[typeid] ? 'selected="selected"':'';
print <<<EOT
-->
	<option $selected value="$k">&nbsp; &nbsp;|-$secend[name]</option>
<!--
EOT;
}}print <<<EOT
-->
<!--
EOT;
}print <<<EOT
-->
</select></td>
					</tr>
					<tr class="tr1 vt">
						<td class="td1">图片描述</td>
						<td class="td2"><textarea class="textarea" name="descrip">$image[descrip]</textarea></td>
					</tr>
				</tbody>
			</table>
		</div>
	<div class="mb10 tac"><span class="btn2"><span><button onfocus="blur();" onclick="ajax.submit(this.form,function(){editImaged($id)});" type="button">提 交</button></span></span><span class="bt2"><span><button onfocus="blur();" onclick="closep();" type="button">取 消</button></span></span></div>
	</div>
	</div>
</form>
<!--
EOT;
}?>-->